import { stringify } from "qs";
import request from "@/utils/request";

// 添加91灵工个人用户
export async function addMobileUser(params) {
  return request.post(`/zb-user/add-mobile-user`, params);
}

// 删除91灵工个人用户
export async function deleteMobileUser(params) {
  return request.post(`/zb-user/delete-mobile-user`, params, "form");
}

// 编辑91灵工个人用户
export async function editMobileUser(params) {
  return request.post(`/zb-user/edit-mobile-user`, params);
}

// 查询91灵工个人用户
export async function searchMobileUser(params) {
  const { searchRequest, pagination } = params;
  return request.post(
    `/zb-user/search-mobile-user?page=${pagination.page}&size=${pagination.size}`,
    searchRequest
  );
}

// 查询91灵工企业任务承揽方进度报告
export async function getMobileUserDetail(params) {
  return request(`/zb-user/get-mobile-user-detail?${stringify(params)}`);
}
